package com.blog.blog.mapper;

import com.blog.blog.vo.ResumeDetailVO;
import com.blog.blog.vo.WorkExperienceVO;
import com.blog.blog.vo.SkillVO;
import com.blog.blog.vo.ProjectVO;
import com.blog.blog.vo.EducationVO;

import java.util.List;

public interface ResumeMapper {

	ResumeDetailVO selectResume();
	List<WorkExperienceVO> listExperiences(@org.apache.ibatis.annotations.Param("resumeId") Long resumeId);
	List<SkillVO> listSkills(@org.apache.ibatis.annotations.Param("resumeId") Long resumeId);
	List<ProjectVO> listProjects(@org.apache.ibatis.annotations.Param("resumeId") Long resumeId);
	List<EducationVO> listEducations(@org.apache.ibatis.annotations.Param("resumeId") Long resumeId);

	// 新增：按用户查询与写操作
	ResumeDetailVO selectResumeByUserId(@org.apache.ibatis.annotations.Param("userId") Long userId);
	Long selectResumeIdByUserId(@org.apache.ibatis.annotations.Param("userId") Long userId);
	int insertResume(@org.apache.ibatis.annotations.Param("userId") Long userId,
	                 @org.apache.ibatis.annotations.Param("name") String name,
	                 @org.apache.ibatis.annotations.Param("title") String title,
	                 @org.apache.ibatis.annotations.Param("summary") String summary,
	                 @org.apache.ibatis.annotations.Param("avatar") String avatar,
	                 @org.apache.ibatis.annotations.Param("email") String email,
	                 @org.apache.ibatis.annotations.Param("phone") String phone,
	                 @org.apache.ibatis.annotations.Param("location") String location,
	                 @org.apache.ibatis.annotations.Param("github") String github,
	                 @org.apache.ibatis.annotations.Param("linkedin") String linkedin,
	                 @org.apache.ibatis.annotations.Param("website") String website);
	int updateResume(@org.apache.ibatis.annotations.Param("userId") Long userId,
	                 @org.apache.ibatis.annotations.Param("name") String name,
	                 @org.apache.ibatis.annotations.Param("title") String title,
	                 @org.apache.ibatis.annotations.Param("summary") String summary,
	                 @org.apache.ibatis.annotations.Param("avatar") String avatar,
	                 @org.apache.ibatis.annotations.Param("email") String email,
	                 @org.apache.ibatis.annotations.Param("phone") String phone,
	                 @org.apache.ibatis.annotations.Param("location") String location,
	                 @org.apache.ibatis.annotations.Param("github") String github,
	                 @org.apache.ibatis.annotations.Param("linkedin") String linkedin,
	                 @org.apache.ibatis.annotations.Param("website") String website);

	// 经验
	int insertExperience(@org.apache.ibatis.annotations.Param("resumeId") Long resumeId,
	                     @org.apache.ibatis.annotations.Param("company") String company,
	                     @org.apache.ibatis.annotations.Param("position") String position,
	                     @org.apache.ibatis.annotations.Param("startDate") String startDate,
	                     @org.apache.ibatis.annotations.Param("endDate") String endDate,
	                     @org.apache.ibatis.annotations.Param("current") Integer current,
	                     @org.apache.ibatis.annotations.Param("description") String description,
	                     @org.apache.ibatis.annotations.Param("achievements") String achievements,
	                     @org.apache.ibatis.annotations.Param("sortOrder") Integer sortOrder);
	int updateExperienceOwned(@org.apache.ibatis.annotations.Param("userId") Long userId,
	                          @org.apache.ibatis.annotations.Param("id") Long id,
	                          @org.apache.ibatis.annotations.Param("company") String company,
	                          @org.apache.ibatis.annotations.Param("position") String position,
	                          @org.apache.ibatis.annotations.Param("startDate") String startDate,
	                          @org.apache.ibatis.annotations.Param("endDate") String endDate,
	                          @org.apache.ibatis.annotations.Param("current") Integer current,
	                          @org.apache.ibatis.annotations.Param("description") String description,
	                          @org.apache.ibatis.annotations.Param("achievements") String achievements,
	                          @org.apache.ibatis.annotations.Param("sortOrder") Integer sortOrder);
	int deleteExperienceOwned(@org.apache.ibatis.annotations.Param("userId") Long userId,
	                          @org.apache.ibatis.annotations.Param("id") Long id);

	// 技能
	int insertSkill(@org.apache.ibatis.annotations.Param("resumeId") Long resumeId,
	                @org.apache.ibatis.annotations.Param("name") String name,
	                @org.apache.ibatis.annotations.Param("category") String category,
	                @org.apache.ibatis.annotations.Param("level") Integer level,
	                @org.apache.ibatis.annotations.Param("description") String description,
	                @org.apache.ibatis.annotations.Param("sortOrder") Integer sortOrder);
	int updateSkillOwned(@org.apache.ibatis.annotations.Param("userId") Long userId,
	                     @org.apache.ibatis.annotations.Param("id") Long id,
	                     @org.apache.ibatis.annotations.Param("name") String name,
	                     @org.apache.ibatis.annotations.Param("category") String category,
	                     @org.apache.ibatis.annotations.Param("level") Integer level,
	                     @org.apache.ibatis.annotations.Param("description") String description,
	                     @org.apache.ibatis.annotations.Param("sortOrder") Integer sortOrder);
	int deleteSkillOwned(@org.apache.ibatis.annotations.Param("userId") Long userId,
	                     @org.apache.ibatis.annotations.Param("id") Long id);

	// 项目
	int insertProject(@org.apache.ibatis.annotations.Param("resumeId") Long resumeId,
	                  @org.apache.ibatis.annotations.Param("name") String name,
	                  @org.apache.ibatis.annotations.Param("description") String description,
	                  @org.apache.ibatis.annotations.Param("highlights") String highlights,
	                  @org.apache.ibatis.annotations.Param("technologies") String technologies,
	                  @org.apache.ibatis.annotations.Param("githubUrl") String githubUrl,
	                  @org.apache.ibatis.annotations.Param("demoUrl") String demoUrl,
	                  @org.apache.ibatis.annotations.Param("imageUrl") String imageUrl,
	                  @org.apache.ibatis.annotations.Param("startDate") String startDate,
	                  @org.apache.ibatis.annotations.Param("endDate") String endDate,
	                  @org.apache.ibatis.annotations.Param("sortOrder") Integer sortOrder);
	int updateProjectOwned(@org.apache.ibatis.annotations.Param("userId") Long userId,
	                       @org.apache.ibatis.annotations.Param("id") Long id,
	                       @org.apache.ibatis.annotations.Param("name") String name,
	                       @org.apache.ibatis.annotations.Param("description") String description,
	                       @org.apache.ibatis.annotations.Param("highlights") String highlights,
	                       @org.apache.ibatis.annotations.Param("technologies") String technologies,
	                       @org.apache.ibatis.annotations.Param("githubUrl") String githubUrl,
	                       @org.apache.ibatis.annotations.Param("demoUrl") String demoUrl,
	                       @org.apache.ibatis.annotations.Param("imageUrl") String imageUrl,
	                       @org.apache.ibatis.annotations.Param("startDate") String startDate,
	                       @org.apache.ibatis.annotations.Param("endDate") String endDate,
	                       @org.apache.ibatis.annotations.Param("sortOrder") Integer sortOrder);
	int deleteProjectOwned(@org.apache.ibatis.annotations.Param("userId") Long userId,
	                       @org.apache.ibatis.annotations.Param("id") Long id);

	// 教育背景
	int insertEducation(@org.apache.ibatis.annotations.Param("resumeId") Long resumeId,
	                    @org.apache.ibatis.annotations.Param("school") String school,
	                    @org.apache.ibatis.annotations.Param("major") String major,
	                    @org.apache.ibatis.annotations.Param("degree") String degree,
	                    @org.apache.ibatis.annotations.Param("startDate") String startDate,
	                    @org.apache.ibatis.annotations.Param("endDate") String endDate,
	                    @org.apache.ibatis.annotations.Param("current") Integer current,
	                    @org.apache.ibatis.annotations.Param("gpa") String gpa,
	                    @org.apache.ibatis.annotations.Param("description") String description,
	                    @org.apache.ibatis.annotations.Param("achievements") String achievements,
	                    @org.apache.ibatis.annotations.Param("sortOrder") Integer sortOrder);
	int updateEducationOwned(@org.apache.ibatis.annotations.Param("userId") Long userId,
	                         @org.apache.ibatis.annotations.Param("id") Long id,
	                         @org.apache.ibatis.annotations.Param("school") String school,
	                         @org.apache.ibatis.annotations.Param("major") String major,
	                         @org.apache.ibatis.annotations.Param("degree") String degree,
	                         @org.apache.ibatis.annotations.Param("startDate") String startDate,
	                         @org.apache.ibatis.annotations.Param("endDate") String endDate,
	                         @org.apache.ibatis.annotations.Param("current") Integer current,
	                         @org.apache.ibatis.annotations.Param("gpa") String gpa,
	                         @org.apache.ibatis.annotations.Param("description") String description,
	                         @org.apache.ibatis.annotations.Param("achievements") String achievements,
	                         @org.apache.ibatis.annotations.Param("sortOrder") Integer sortOrder);
	int deleteEducationOwned(@org.apache.ibatis.annotations.Param("userId") Long userId,
	                         @org.apache.ibatis.annotations.Param("id") Long id);
}


